Replication File for "Tweeting Beyond Tahrir: Ideological Diversity and Political Tolerance in Egyptian Twitter Networks," World Politics, Forthcoming 2021.


** Citation **

Siegel, Alexandra A., Jonathan Nagler, Richard Bonneau, and Joshua A. Tucker. 2021. "Tweeting Beyond Tahrir: Ideological Diversity and Political Tolerance in Egyptian Twitter Networks." World Politics. 

@article{Siegel2021,
author = {Alexandra A. Siegel, Jonathan Nagler, Richard Bonneau, and Joshua A. Tucker.},
journal = {World Politics},
title = {{Tweeting Beyond Tahrir: Ideological Diversity and Political Tolerance in Egyptian Twitter Networks}},
volume = {(forthcoming)},
year = {2021}
}

** Notes **

Set the working directory to the folder where ReadMe.txt is located.


** Datasets **
 
1. network_tolerance_data.csv

-- anonymized network and tolerance data
		
2. network_tolerance_processed_data.csv

-- anonymized network and tolerance data with variables for regression analysis 

3. dynamic_network_tolerance_data.csv

-- anonymized dynamic network and tolerance data

4. dynamic_network_tolerance_processed_data.csv

-- anonymized network and tolerance data with variables for dynamic regression analysis 

5. human_coded_data.csv

--- anonymized network and tolerance data for users whose tweets were manually coded

6. thresholds.csv

--- non-elite network data calculated at different ideology thresholds

7. egypt_geo.csv

--- geolocation data for geolocated users 

** R files **

 (in the "code" folder)
Please run these scripts in order:

1. data_processing.R
-- Creates variables for descriptive statistics and regression analysis
-- Output: network_tolerance_processed_data.csv 

2. dynamic_data_processing.R
-- Creates variables for descriptive statistics and dynamic regression analysis
-- Output: network_tolerance_dynamic_data.csv

3. descriptive_statistics.R
-- Creates descriptive statistics for aggregated and dynamic data 
-- Output: Figures: 3,6, & A3; Tables: A3, A4

4. regression_analysis.R
-- Runs regressions and creates tables and coefficient plots for aggregated analysis
-- Output: Figure 4; Tables: B1, B2, B4, B5-B7 

5. dynamic_regression_analysis.R
-- Runs regressions and creates tables and coefficient plots for dynamic analysis
-- Output: Figure 5; Tables: B8-B10

6. sensitivity_analysis.R
-- Conducts sensitivity analysis and creates tables and figures displaying output 
-- Output: Figure C1; Tables: C1-C2

7. human_coded_analysis.R
-- Regression analysis for human coded data tables and figures displaying output 
-- Output: Tables A14

8. egypt_geo.R

-- Mapping geo-coordinates of geolocated users
-- Output: Figure 2

